package com.googlecode.rjm.model.journal;

import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import com.googlecode.rjm.model.Issue;


@Entity
@DiscriminatorValue("Issue")
public class IssueJournal extends Journal {
	
	private static final long serialVersionUID = 1L;

	@ManyToOne
	@JoinColumn(name="journalized_id")
	private Issue issue;

	public Issue getIssue() {
		return this.issue;
	}

	public void setIssue(Issue issue) {
		this.issue = issue;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("IssueJournal [issue=");
		builder.append(issue);
		builder.append(", getNotes()=");
		builder.append(getNotes());
		builder.append(", getUser()=");
		builder.append(getUser());
		builder.append("]");
		return builder.toString();
	}
	
}
